package com.ruoyi.InboundManagement.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.InboundManagement.mapper.TransferInboundMapper;
import com.ruoyi.InboundManagement.domain.TransferInbound;
import com.ruoyi.InboundManagement.service.ITransferInboundService;

/**
 * 调拨入库管理Service业务层处理
 * 
 * @author admin
 * @date 2024-07-03
 */
@Service
public class TransferInboundServiceImpl implements ITransferInboundService 
{
    @Autowired
    private TransferInboundMapper transferInboundMapper;

    /**
     * 查询调拨入库管理
     * 
     * @param transferId 调拨入库管理主键
     * @return 调拨入库管理
     */
    @Override
    public TransferInbound selectTransferInboundByTransferId(Long transferId)
    {
        return transferInboundMapper.selectTransferInboundByTransferId(transferId);
    }

    /**
     * 查询调拨入库管理列表
     * 
     * @param transferInbound 调拨入库管理
     * @return 调拨入库管理
     */
    @Override
    public List<TransferInbound> selectTransferInboundList(TransferInbound transferInbound)
    {
        return transferInboundMapper.selectTransferInboundList(transferInbound);
    }

    /**
     * 新增调拨入库管理
     * 
     * @param transferInbound 调拨入库管理
     * @return 结果
     */
    @Override
    public int insertTransferInbound(TransferInbound transferInbound)
    {
        transferInbound.setCreateTime(new Date());
        return transferInboundMapper.insertTransferInbound(transferInbound);
    }

    /**
     * 修改调拨入库管理
     * 
     * @param transferInbound 调拨入库管理
     * @return 结果
     */
    @Override
    public int updateTransferInbound(TransferInbound transferInbound)
    {
        return transferInboundMapper.updateTransferInbound(transferInbound);
    }

    /**
     * 批量删除调拨入库管理
     * 
     * @param transferIds 需要删除的调拨入库管理主键
     * @return 结果
     */
    @Override
    public int deleteTransferInboundByTransferIds(Long[] transferIds)
    {
        return transferInboundMapper.deleteTransferInboundByTransferIds(transferIds);
    }

    /**
     * 删除调拨入库管理信息
     * 
     * @param transferId 调拨入库管理主键
     * @return 结果
     */
    @Override
    public int deleteTransferInboundByTransferId(Long transferId)
    {
        return transferInboundMapper.deleteTransferInboundByTransferId(transferId);
    }
}
